package com.etc.test3.cglib;


import org.springframework.cglib.proxy.Enhancer;

/**
 * @author MaZheng
 * @since 2020/12/23 - 16:45
 */
public class TestMain1 {

    public static void main(String[] args) {

        Enhancer enhancer = new Enhancer();
        enhancer.setSuperclass(Target.class);

        enhancer.setCallback(new ProxyToolsMethodInterceptor());

        Target t1 = (Target) enhancer.create();

        t1.a1();
        t1.a2();

    }
}
